<?php
	require_once $_SERVER['DOCUMENT_ROOT'] . '/SAGER/logic/CustomCommand.php';
	require_once $_SERVER['DOCUMENT_ROOT'] . '/SAGER/model/factory/DaoFactory.php';
	
	error_reporting (E_ALL ^ E_NOTICE);
	
	$debug = $_SESSION['debug'];
		
	/*
	* Class to create a place
	*/
	class CommandCreatePlace extends CustomCommand {
		/*
		* Constructor of the class
		*/
		public function __construct ($place) {
			$this -> place = $place;
		}
		
		/*
		* Method to execute to create the place
		*/
		public function execute() {
			$daoFactory = DaoFactory :: getMySqlDaoFactory();
			$ipad = $daoFactory -> getMySqlPlaceAccessDao();			
			$placeCreation = $ipad -> createPlace($this -> place);
	
			$this -> result = $placeCreation;
		}
	}
?>